package com.bytecollege.controller;

import com.bytecollege.util.FileUploadUtil;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.util.Map;

@RestController
public class ImageUploadController {
    @PostMapping("/image/upload")
    public Map<String,Object> upload(@RequestParam(value = "file") MultipartFile file){
        return FileUploadUtil.save(file);
    }


}
